import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/refund_order_list_entity.dart';

RefundOrderListEntity $RefundOrderListEntityFromJson(Map<String, dynamic> json) {
	final RefundOrderListEntity refundOrderListEntity = RefundOrderListEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		refundOrderListEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		refundOrderListEntity.msg = msg;
	}
	final List<RefundOrderListData>? data = jsonConvert.convertListNotNull<RefundOrderListData>(json['data']);
	if (data != null) {
		refundOrderListEntity.data = data;
	}
	return refundOrderListEntity;
}

Map<String, dynamic> $RefundOrderListEntityToJson(RefundOrderListEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	return data;
}

RefundOrderListData $RefundOrderListDataFromJson(Map<String, dynamic> json) {
	final RefundOrderListData refundOrderListData = RefundOrderListData();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		refundOrderListData.id = id;
	}
	final String? orderNo = jsonConvert.convert<String>(json['order_no']);
	if (orderNo != null) {
		refundOrderListData.orderNo = orderNo;
	}
	final int? orderGoodsId = jsonConvert.convert<int>(json['order_goods_id']);
	if (orderGoodsId != null) {
		refundOrderListData.orderGoodsId = orderGoodsId;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		refundOrderListData.type = type;
	}
	final int? num = jsonConvert.convert<int>(json['num']);
	if (num != null) {
		refundOrderListData.num = num;
	}
	final String? totalPrice = jsonConvert.convert<String>(json['total_price']);
	if (totalPrice != null) {
		refundOrderListData.totalPrice = totalPrice;
	}
	final int? status = jsonConvert.convert<int>(json['status']);
	if (status != null) {
		refundOrderListData.status = status;
	}
	final int? storeId = jsonConvert.convert<int>(json['store_id']);
	if (storeId != null) {
		refundOrderListData.storeId = storeId;
	}
	final String? storeName = jsonConvert.convert<String>(json['store_name']);
	if (storeName != null) {
		refundOrderListData.storeName = storeName;
	}
	final String? retreatTitle = jsonConvert.convert<String>(json['retreat_title']);
	if (retreatTitle != null) {
		refundOrderListData.retreatTitle = retreatTitle;
	}
	final String? retreatDetails = jsonConvert.convert<String>(json['retreat_details']);
	if (retreatDetails != null) {
		refundOrderListData.retreatDetails = retreatDetails;
	}
	final List<RefundOrderListDataSkuData>? skuData = jsonConvert.convertListNotNull<RefundOrderListDataSkuData>(json['sku_data']);
	if (skuData != null) {
		refundOrderListData.skuData = skuData;
	}
	final String? imgPath = jsonConvert.convert<String>(json['img_path']);
	if (imgPath != null) {
		refundOrderListData.imgPath = imgPath;
	}
	final int? isShowExpress = jsonConvert.convert<int>(json['is_show_express']);
	if (isShowExpress != null) {
		refundOrderListData.isShowExpress = isShowExpress;
	}
	final String? goodsName = jsonConvert.convert<String>(json['goods_name']);
	if (goodsName != null) {
		refundOrderListData.goodsName = goodsName;
	}
	return refundOrderListData;
}

Map<String, dynamic> $RefundOrderListDataToJson(RefundOrderListData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['order_no'] = entity.orderNo;
	data['order_goods_id'] = entity.orderGoodsId;
	data['type'] = entity.type;
	data['num'] = entity.num;
	data['total_price'] = entity.totalPrice;
	data['status'] = entity.status;
	data['store_id'] = entity.storeId;
	data['store_name'] = entity.storeName;
	data['retreat_title'] = entity.retreatTitle;
	data['retreat_details'] = entity.retreatDetails;
	data['sku_data'] =  entity.skuData.map((v) => v.toJson()).toList();
	data['img_path'] = entity.imgPath;
	data['is_show_express'] = entity.isShowExpress;
	data['goods_name'] = entity.goodsName;
	return data;
}

RefundOrderListDataSkuData $RefundOrderListDataSkuDataFromJson(Map<String, dynamic> json) {
	final RefundOrderListDataSkuData refundOrderListDataSkuData = RefundOrderListDataSkuData();
	final String? skuKey = jsonConvert.convert<String>(json['sku_key']);
	if (skuKey != null) {
		refundOrderListDataSkuData.skuKey = skuKey;
	}
	final String? skuVal = jsonConvert.convert<String>(json['sku_val']);
	if (skuVal != null) {
		refundOrderListDataSkuData.skuVal = skuVal;
	}
	return refundOrderListDataSkuData;
}

Map<String, dynamic> $RefundOrderListDataSkuDataToJson(RefundOrderListDataSkuData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['sku_key'] = entity.skuKey;
	data['sku_val'] = entity.skuVal;
	return data;
}